package panel.common;

import global.Const;

import javax.swing.*;

public class BackGround extends JPanel {
    public BackGround(String filename) {
        setBounds(0, -5, Const.PANEL_WIDTH, Const.PANEL_HEIGHT);
        JLabel backGround = new JLabel(new ImageIcon(filename));
        backGround.setBounds(0, 0, Const.PANEL_WIDTH, Const.PANEL_HEIGHT);
        add(backGround);
    }

    public BackGround(String imagePath,int width,int height) {
        setBounds(0, -5, width, height);
        JLabel backGround = new JLabel(new ImageIcon(imagePath));
        backGround.setBounds(0, 0, width, height);
        add(backGround);
    }
}
